This repository has been archived on 2024-04-08. You can view files and clone it, but cannot push or open issues or pull requests.
lnldap/classes/Model/LDAP/Schema.php

26 lines
686 B
PHP
Raw Normal View History

2014-02-11 05:53:37 +00:00
<?php defined('SYSPATH') or die('No direct access allowed.');
/**
* This class holds our LDAP Schema
*
* @package Kohana/Database
* @category Models
* @author Deon George
* @copyright (c) 2013 phpLDAPadmin Development Team
* @license http://dev.phpldapadmin.org/license.html
*/
class Model_LDAP_Schema extends ORM_LDAP {
2014-02-13 05:07:03 +00:00
public function attribute($column) {
$k = 'attributetypes';
return new Schema_Attribute(($x = $this->_attr_search($k,$column)) ? $this->_object[$k][$x] : '');
2014-02-13 05:07:03 +00:00
}
private function _attr_search($key,$column) {
foreach ($this->_object[$key] as $k=>$v)
if (preg_match("/^\( (.*) NAME (\( )?\'$column\' /i",$v))
return $k;
}
2014-02-11 05:53:37 +00:00
}
?>