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

<?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 {
public function attribute($column) {
$k = 'attributetypes';
return new Schema_Attribute(($x = $this->_attr_search($k,$column)) ? $this->_object[$k][$x] : '');
}
private function _attr_search($key,$column) {
foreach ($this->_object[$key] as $k=>$v)
if (preg_match("/^\( (.*) NAME (\( )?\'$column\' /i",$v))
return $k;
}
}
?>