Perhaps you should move this to a proposal so that the community can have a chance to see the proposed api's and features. It looks interesting.
I am of a split mind about this one. In one regard, it does look convenient. But in another regard, I'd like to see the value it brings over the net functions that are already built into php. Are there any of these functions that will encompass heavy math driven tasks, etc. -ralph On 12/4/08 3:32 PM, "A.J. Brown" <[EMAIL PROTECTED]> wrote: > Hello all, > > I wrote a library for matching IP addresses, ranges, and networks against > eachother with support for subnet masks, CIDR, and IPv6 a few months ago. > It's useful for writing IP filters (firewall-esque) and such. It uses bitwise > mathematical calculations to do the matching, so it's quick and solid. > > I'd like to adapt it into Zend Framework. What are your thoughts on creating > a Zend_Net package? > > Here are some quick off-the-top classes I think would be useful: > > Zend_Net_Address (for example) > * Class to represent and translate IP addresses (IPv4 -> IPv6 for example) > * Class to represent and translate network addresses > * Class to represent other protocol addresses, such as MAC address > * Class to handle matching an input IP or range against a pool of classes from > the above examples > > > quick ex: > > $oNetwork = new Zend_Net_Address_Network_IPv4( '192.168.0.0', '255.255.255.0' > ); > > // give me an array of Zend_Net_Address_Host_IPv4 objects within this network > $aAddressesIp4 = $oNetwork->getAddresses(); > > // tell me the class of some IPv4 address > $oHost = new Zend_Net_Address_IPv4( $sUserInput ); > echo $oHost->getNetworkClass(); > > // is the address a private address? > echo $oHost->isPrivate() ? 'yes' : 'no'; > > > What are your thoughts? I can think of a few use-cases where this would be > useful for rapid development and easy cooperation with the rest of Zend > Framework. > > > -- A.J. Brown > Zend Certfied PHP Engineer > HOME: http://ajbrown.me > BLOG: http://coding-adventures.blogspot.com -- Ralph Schindler Software Engineer | [EMAIL PROTECTED] Zend Framework | http://framework.zend.com/
